package Domain;

import java.util.ArrayList;

/**
 * Class representing a Deck object containing note cards.
 * */
public class Deck implements IDomainObject {
	
	private int _ID;
	private String _Name;
	private ArrayList<NoteCard> _NoteCards;
	
	/**
	 * Default constructor. Sets the ID to -1.
	 * */
	public Deck(){
		_ID = -1;
		_NoteCards = new ArrayList<NoteCard>();
	}
	
	/**
	 * Constructor that takes an ID.
	 * @param	id	The ID to initialize this deck with.
	 * */
	public Deck(int id) {
		_ID = id;
		_NoteCards = new ArrayList<NoteCard>();
	}
	
	/**
	 * Adds a blank note card to the deck.
	 * */
	public void addNewNoteCard() {
		_NoteCards.add(new NoteCard());
	}
	
	/**
	 * Adds the given note card to the deck.
	 * @param	noteCard	The note card instance to add. {@link NoteCard}
	 * */
	public void addNoteCard(NoteCard noteCard){
		_NoteCards.add(noteCard);
	}
	
	/**
	 * Gets the ID of this deck.
	 * @return {@link int}
	 * */
	public int getID() {
		return _ID;
	}
	
	/**
	 * Gets the list of note cards in this deck.
	 * @return	{@link ArrayList<NoteCard>}
	 * */
	public ArrayList<NoteCard> getNoteCards() {
		return _NoteCards;
	}
	
	/**
	 * Gets the name of this deck.
	 * @return {@link String}
	 * */
	public String getName() {
		return _Name;
	}
	
	/**
	 * Sets this deck's name to the given name.
	 * @param	newName		The new name to give to this deck. {@link String}
	 * */
	public void setName(String newName) {
		_Name = newName;
	}
}
